import request from '@/utils/request'

export function getTags(params) {
  return request({
    url: 'tags',
    method: 'get',
    params
  })
}

export function addTag(data) {
  return request({
    url: 'tags/',
    method: 'post',
    data
  })
}

export function delTag(id) {
  return request({
    url: 'tags/' + id + '/',
    method: 'delete'
  })
}

export function editTag(id, data) {
  return request({
    url: 'tags/' + id + '/',
    method: 'put',
    data
  })
}
